import request from '@/utils/request'

export function orgChart() {
  return request({
    url: '/organization/chart',
    method: 'get'
  })
}

export function structure() {
  return request({
    url: '/organization/structure',
    method: 'get'
  })
}

export function deptList() {
  return request({
    url: '/organization/deptList',
    method: 'get'
  })
}


export function editOrganization(data) {
  return request({
    url: '/organization/editOrganization',
    method: 'post',
    data
  })
}

export function saveOrg(data) {
  return request({
    url: '/organization/saveOrg',
    method: 'post',
    data
  })
}


export function delOrg(id,grade) {
  return request({
    url: `/organization/del/${grade}/${id}`,
    method: 'delete'
  })
}

export function sel(id,grade) {
  return request({
    url: `/organization/sel/${grade}/${id}`,
    method: 'get'
  })
}

